<?php

namespace app\models;

use yii\db\ActiveRecord;
use Yii;

class FictionType extends ActiveRecord{
	
	
	public static function tableName(){
		// return "shop_admin";
		return "{{%FictionType}}";
	}

	public function rules()
    {
    }

    public function attributeLabels()
    {
        return [
            'fTid ' => '类型id',
            'fType ' => '类型名称',
            'fCount ' => '持有漫画数量',
        ];
    }
    
    //插入数据
    public function insertType($data){
        //load是php框架内部自主加载数据的函数，而validate是自主验证rules
    }

    //查找所有类型名称
    public function getAlltype(){
    	$data = self::find()->select(['fTid','fType'])->asArray()->all();
		return $data;
    }
}
